﻿using System;
using System.Collections.Generic;
using System.Linq;

using SharedGenomics.Core;

namespace SharedGenomics.Domain.Builders
{
    public class PModelJobBuilder : JobBuilder
    {
        internal PModelJobBuilder()
            : base(JobType.PModel)
        {
        }

        public override JobInfo Build()
        {
            JobInfo baseInfo = base.Build();

            //at least one model option must be specified
            ExceptionHelper.ThrowIf<BuilderStateException>(this.PModelOptions == ModelOptionFlags.None, this.GetUnsetVariableExceptionMessage("Model options"));

            baseInfo.ModelOptions = this.PModelOptions;
            return baseInfo;
        }
    }
}
